package com.ht.medicaltreatment.adapter

import android.widget.ImageView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.ht.medicaltreatment.R
import com.ht.medicaltreatment.bean.SampleVO

class OrderItemAdapter(list:MutableList<SampleVO>,type:Boolean) : BaseQuickAdapter<SampleVO, BaseViewHolder>
    (R.layout.item_order_detail_layout,list) {
    private val type = type
    override fun convert(holder: BaseViewHolder, item: SampleVO) {
        val icon = holder.getView<ImageView>(R.id.imgBg)
        if(item.status == 1){
            if(type){
                icon.setBackgroundResource(R.drawable.shape_circle_white)
            }else{
                icon.setBackgroundResource(R.drawable.shape_circle_gray)
            }
        }else{
            icon.setBackground(null)
        }
    }

}
